home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-06 | 2.1 KB | 68 lines | [TEXT/MPS ] |
-
- /**********************************/
- /* #defines */
- /**********************************/
-
- // Used as a macro to simplify one line of code. Use an exclusive OR to switch from 0 to 1,
- // or from 1 to 0. This is the index for our two buffer handle array
-
- #define NextBuffer(x) (x ^= 1)
-
- //The number of Milliseconds of sound which is recorded before playback 70 best
- #define kMilliSecondsOfSound 250
-
- //The number of Milliseconds of sound which is recorded before playback
- #define kNetBufferSize 20000
-
- //Size of the top of the 'snd ' header
- #define kBaseHeaderSize 6
-
- //Multiplier to determine the size of the Synths in the header
- #define kSynthSize 6
-
- //Multiplier to determine the size of the Cmds in the header
- #define kCmdSize 8
-
- // Number of buffers being used
- #define kNumberOfBuffers 2
-
- // When building the SndHeader I use this constant to declare Middle C base Frequency
- #define kMiddleC 0x3C
-
- // the error dialog for messages
- #define kErrorDialogID 128
-
- // OK Button ID for the Error Handling Dialog
- #define kOKButton 1
-
- // this is the static text item used to display the OSErr
- #define kErrNumStatText 5
-
- // this is the static text item used to display a message to the user
- #define kMsgStatText 2
-
- // nil used to open the default sound input driver
- #define kDefaultDriver nil
-
- // estimate the largest 'snd ' header that we could imagine
- #define kEstimatedHeaderSize (sizeof (SndListResource) + sizeof (ExtSoundHeader))
-
- /**********************************/
- /* prototypes for the functions */
- /**********************************/
-
- void TestTheSystem (void);
- void GetSoundDeviceInfo (void);
- void SetUpSounds (Handle *bufferHandle, short *headerSize);
- int FindHeaderSize (void);
- void BuildRecordStruct (Handle bufferHandle);
- void ResetSoundHeader (Handle bufferHandle);
- void ExitWithMessage (char *message, OSErr error);
- void TimeToQuit (void);
- pascal void MyRecComp (SPBPtr inParamPtr);
- void RealCompletion (void);
- void InitSoundStuff (void);
- void StartRecord (void);
- long SendSoundData (void);
- void SoundCleanUpAndQuit (void);
-